﻿using System.Text;
using System.Diagnostics;

namespace LibraryApi
{
    public static class StringEx
    {
        public static string concat(this string @string, params object[] values)
        {
            Debug.Assert(!string.IsNullOrWhiteSpace(@string));

            StringBuilder b = new StringBuilder(@string);
            foreach (var value in values)
                b.Append(value);
            return b.ToString();
        }

        public static string format(this string format, params object[] values)
        {
            Debug.Assert(!string.IsNullOrWhiteSpace(format));

            return string.Format(format, values);
        }
    }
}
